<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="100px"
    >
      <el-form-item label="店铺ID" prop="shopId">
        <el-input
          v-model="queryParams.shopId"
          placeholder="请输入店铺ID"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="日期" prop="dataDate">
        <el-date-picker
          clearable
          v-model="queryParams.dataDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择日期"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="渠道" prop="channel">
        <el-input
          v-model="queryParams.channel"
          placeholder="请输入渠道"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="品牌" prop="brand">
        <el-input
          v-model="queryParams.brand"
          placeholder="请输入品牌"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
        <el-button
          :icon="!isOpen ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
          size="mini"
          @click="shouqi"
          >展开/收起</el-button
        >
      </el-form-item>
      <div v-if="isOpen">
        <el-form-item label="PC端访客数" prop="pcVisitors">
          <el-input
            v-model="queryParams.pcVisitors"
            placeholder="请输入PC端访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端浏览量" prop="pcViews">
          <el-input
            v-model="queryParams.pcViews"
            placeholder="请输入PC端浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="访客数" prop="visitors">
          <el-input
            v-model="queryParams.visitors"
            placeholder="请输入访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端访客数" prop="mobileVisitors">
          <el-input
            v-model="queryParams.mobileVisitors"
            placeholder="请输入无线端访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="浏览量" prop="views">
          <el-input
            v-model="queryParams.views"
            placeholder="请输入浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端浏览量" prop="mobileViews">
          <el-input
            v-model="queryParams.mobileViews"
            placeholder="请输入无线端浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品访客数" prop="productVisitors">
          <el-input
            v-model="queryParams.productVisitors"
            placeholder="请输入商品访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端商品访客数" prop="mobileProductVisitors">
          <el-input
            v-model="queryParams.mobileProductVisitors"
            placeholder="请输入无线端商品访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端商品访客数" prop="pcProductVisitors">
          <el-input
            v-model="queryParams.pcProductVisitors"
            placeholder="请输入PC端商品访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品浏览量" prop="productViews">
          <el-input
            v-model="queryParams.productViews"
            placeholder="请输入商品浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端商品浏览量" prop="mobileProductViews">
          <el-input
            v-model="queryParams.mobileProductViews"
            placeholder="请输入无线端商品浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端商品浏览量" prop="pcProductViews">
          <el-input
            v-model="queryParams.pcProductViews"
            placeholder="请输入PC端商品浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="平均停留时长" prop="averageDuration">
          <el-input
            v-model="queryParams.averageDuration"
            placeholder="请输入平均停留时长"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端平均停留时长" prop="mobileAvgDuration">
          <el-input
            v-model="queryParams.mobileAvgDuration"
            placeholder="请输入无线端平均停留时长"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端平均停留时长" prop="pcAvgDuration">
          <el-input
            v-model="queryParams.pcAvgDuration"
            placeholder="请输入PC端平均停留时长"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="跳失率" prop="bounceRate">
          <el-input
            v-model="queryParams.bounceRate"
            placeholder="请输入跳失率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端跳失率" prop="mobileBounceRate">
          <el-input
            v-model="queryParams.mobileBounceRate"
            placeholder="请输入无线端跳失率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端跳失率" prop="pcBounceRate">
          <el-input
            v-model="queryParams.pcBounceRate"
            placeholder="请输入PC端跳失率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品收藏买家数" prop="productCollectionBuyers">
          <el-input
            v-model="queryParams.productCollectionBuyers"
            placeholder="请输入商品收藏买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="无线端商品收藏买家数"
          prop="mobileProductCollectionBuyers"
        >
          <el-input
            v-model="queryParams.mobileProductCollectionBuyers"
            placeholder="请输入无线端商品收藏买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="PC端商品收藏买家数"
          prop="pcProductCollectionBuyers"
        >
          <el-input
            v-model="queryParams.pcProductCollectionBuyers"
            placeholder="请输入PC端商品收藏买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="商品收藏次数" prop="productCollectionCount">
          <el-input
            v-model="queryParams.productCollectionCount"
            placeholder="请输入商品收藏次数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="无线端商品收藏次数"
          prop="mobileProductCollectionCount"
        >
          <el-input
            v-model="queryParams.mobileProductCollectionCount"
            placeholder="请输入无线端商品收藏次数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端商品收藏次数" prop="pcProductCollectionCount">
          <el-input
            v-model="queryParams.pcProductCollectionCount"
            placeholder="请输入PC端商品收藏次数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="加购人数" prop="addtocartUsers">
          <el-input
            v-model="queryParams.addtocartUsers"
            placeholder="请输入加购人数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端加购人数" prop="mobileAddtocartUsers">
          <el-input
            v-model="queryParams.mobileAddtocartUsers"
            placeholder="请输入无线端加购人数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端加购人数" prop="pcAddtocartUsers">
          <el-input
            v-model="queryParams.pcAddtocartUsers"
            placeholder="请输入PC端加购人数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付金额" prop="paymentAmount">
          <el-input
            v-model="queryParams.paymentAmount"
            placeholder="请输入支付金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付金额" prop="pcPaymentAmount">
          <el-input
            v-model="queryParams.pcPaymentAmount"
            placeholder="请输入PC端支付金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付金额" prop="mobilePaymentAmount">
          <el-input
            v-model="queryParams.mobilePaymentAmount"
            placeholder="请输入无线端支付金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付买家数" prop="paidCustomers">
          <el-input
            v-model="queryParams.paidCustomers"
            placeholder="请输入支付买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付买家数" prop="pcPaidCustomers">
          <el-input
            v-model="queryParams.pcPaidCustomers"
            placeholder="请输入PC端支付买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付买家数" prop="mobilePaidCustomers">
          <el-input
            v-model="queryParams.mobilePaidCustomers"
            placeholder="请输入无线端支付买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付子订单数" prop="paidSuborders">
          <el-input
            v-model="queryParams.paidSuborders"
            placeholder="请输入支付子订单数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付子订单数" prop="pcPaidSuborders">
          <el-input
            v-model="queryParams.pcPaidSuborders"
            placeholder="请输入PC端支付子订单数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付子订单数" prop="mobilePaidSuborders">
          <el-input
            v-model="queryParams.mobilePaidSuborders"
            placeholder="请输入无线端支付子订单数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付件数" prop="payNumber">
          <el-input
            v-model="queryParams.payNumber"
            placeholder="请输入支付件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付件数" prop="pcPayNumber">
          <el-input
            v-model="queryParams.pcPayNumber"
            placeholder="请输入PC端支付件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付件数" prop="mobilePayNumber">
          <el-input
            v-model="queryParams.mobilePayNumber"
            placeholder="请输入无线端支付件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="下单金额" prop="orderAmount">
          <el-input
            v-model="queryParams.orderAmount"
            placeholder="请输入下单金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端下单金额" prop="pcOrderAmount">
          <el-input
            v-model="queryParams.pcOrderAmount"
            placeholder="请输入PC端下单金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端下单金额" prop="mobileOrderAmount">
          <el-input
            v-model="queryParams.mobileOrderAmount"
            placeholder="请输入无线端下单金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="下单买家数" prop="orderBuyers">
          <el-input
            v-model="queryParams.orderBuyers"
            placeholder="请输入下单买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端下单买家数" prop="pcOrderBuyers">
          <el-input
            v-model="queryParams.pcOrderBuyers"
            placeholder="请输入PC端下单买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端下单买家数" prop="mobileOrderBuyers">
          <el-input
            v-model="queryParams.mobileOrderBuyers"
            placeholder="请输入无线端下单买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="下单件数" prop="totalOrderNum">
          <el-input
            v-model="queryParams.totalOrderNum"
            placeholder="请输入下单件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端下单件数" prop="pcOrderNum">
          <el-input
            v-model="queryParams.pcOrderNum"
            placeholder="请输入PC端下单件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端下单件数" prop="mobileOrderNum">
          <el-input
            v-model="queryParams.mobileOrderNum"
            placeholder="请输入无线端下单件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="人均浏览量" prop="avgViews">
          <el-input
            v-model="queryParams.avgViews"
            placeholder="请输入人均浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端人均浏览量" prop="pcAvgViews">
          <el-input
            v-model="queryParams.pcAvgViews"
            placeholder="请输入PC端人均浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端人均浏览量" prop="mobileAvgViews">
          <el-input
            v-model="queryParams.mobileAvgViews"
            placeholder="请输入无线端人均浏览量"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="下单转化率" prop="orderConversionRate">
          <el-input
            v-model="queryParams.orderConversionRate"
            placeholder="请输入下单转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端下单转化率" prop="pcOrderConversionRate">
          <el-input
            v-model="queryParams.pcOrderConversionRate"
            placeholder="请输入PC端下单转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端下单转化率" prop="mobileOrderConversionRate">
          <el-input
            v-model="queryParams.mobileOrderConversionRate"
            placeholder="请输入无线端下单转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付转化率" prop="payConversionRate">
          <el-input
            v-model="queryParams.payConversionRate"
            placeholder="请输入支付转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付转化率" prop="pcPayConversionRate">
          <el-input
            v-model="queryParams.pcPayConversionRate"
            placeholder="请输入PC端支付转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付转化率" prop="mobilePayConversionRate">
          <el-input
            v-model="queryParams.mobilePayConversionRate"
            placeholder="请输入无线端支付转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="客单价" prop="avgCartValue">
          <el-input
            v-model="queryParams.avgCartValue"
            placeholder="请输入客单价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端客单价" prop="pcAvgCartValue">
          <el-input
            v-model="queryParams.pcAvgCartValue"
            placeholder="请输入PC端客单价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端客单价" prop="mobileAvgCartValue">
          <el-input
            v-model="queryParams.mobileAvgCartValue"
            placeholder="请输入无线端客单价"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="UV价值" prop="uvValue">
          <el-input
            v-model="queryParams.uvValue"
            placeholder="请输入UV价值"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端UV价值" prop="pcUvValue">
          <el-input
            v-model="queryParams.pcUvValue"
            placeholder="请输入PC端UV价值"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端UV价值" prop="mobileUvValue">
          <el-input
            v-model="queryParams.mobileUvValue"
            placeholder="请输入无线端UV价值"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="老访客数" prop="oldVisitors">
          <el-input
            v-model="queryParams.oldVisitors"
            placeholder="请输入老访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="新访客数" prop="newVisitors">
          <el-input
            v-model="queryParams.newVisitors"
            placeholder="请输入新访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端老访客数" prop="mobileOldVisitors">
          <el-input
            v-model="queryParams.mobileOldVisitors"
            placeholder="请输入无线端老访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端新访客数" prop="mobileNewVisitors">
          <el-input
            v-model="queryParams.mobileNewVisitors"
            placeholder="请输入无线端新访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端老访客数" prop="pcOldVisitors">
          <el-input
            v-model="queryParams.pcOldVisitors"
            placeholder="请输入PC端老访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端新访客数" prop="pcNewVisitors">
          <el-input
            v-model="queryParams.pcNewVisitors"
            placeholder="请输入PC端新访客数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="加购件数" prop="addtocartItems">
          <el-input
            v-model="queryParams.addtocartItems"
            placeholder="请输入加购件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端加购件数" prop="pcAddtocartNum">
          <el-input
            v-model="queryParams.pcAddtocartNum"
            placeholder="请输入PC端加购件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端加购件数" prop="mobileAddtocartNum">
          <el-input
            v-model="queryParams.mobileAddtocartNum"
            placeholder="请输入无线端加购件数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付老买家数" prop="oldPaidCustomers">
          <el-input
            v-model="queryParams.oldPaidCustomers"
            placeholder="请输入支付老买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付老买家数" prop="pcOldPaidCustomers">
          <el-input
            v-model="queryParams.pcOldPaidCustomers"
            placeholder="请输入PC端支付老买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付老买家数" prop="mobileOldPaidCustomers">
          <el-input
            v-model="queryParams.mobileOldPaidCustomers"
            placeholder="请输入无线端支付老买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="老买家支付金额" prop="oldCustomerPaidAmount">
          <el-input
            v-model="queryParams.oldCustomerPaidAmount"
            placeholder="请输入老买家支付金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="直通车消耗" prop="ztcConsume">
          <el-input
            v-model="queryParams.ztcConsume"
            placeholder="请输入直通车消耗"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="钻石展位消耗" prop="zszwConsume">
          <el-input
            v-model="queryParams.zszwConsume"
            placeholder="请输入钻石展位消耗"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="淘宝客佣金" prop="tbUserCommission">
          <el-input
            v-model="queryParams.tbUserCommission"
            placeholder="请输入淘宝客佣金"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="成功退款金额" prop="successReturnAmount">
          <el-input
            v-model="queryParams.successReturnAmount"
            placeholder="请输入成功退款金额"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="评价数" prop="reviewCount">
          <el-input
            v-model="queryParams.reviewCount"
            placeholder="请输入评价数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="有图评价数" prop="reviewWithImages">
          <el-input
            v-model="queryParams.reviewWithImages"
            placeholder="请输入有图评价数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="正面评价数" prop="positiveReviews">
          <el-input
            v-model="queryParams.positiveReviews"
            placeholder="请输入正面评价数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="负面评价数" prop="negativeReviews">
          <el-input
            v-model="queryParams.negativeReviews"
            placeholder="请输入负面评价数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="老买家正面评价数" prop="oldCustomerPositive">
          <el-input
            v-model="queryParams.oldCustomerPositive"
            placeholder="请输入老买家正面评价数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="老买家负面评价数" prop="oldCustomerNegative">
          <el-input
            v-model="queryParams.oldCustomerNegative"
            placeholder="请输入老买家负面评价数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付父订单数" prop="parentPayments">
          <el-input
            v-model="queryParams.parentPayments"
            placeholder="请输入支付父订单数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="揽收包裹数" prop="pickupPackages">
          <el-input
            v-model="queryParams.pickupPackages"
            placeholder="请输入揽收包裹数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="发货包裹数" prop="shippedPackages">
          <el-input
            v-model="queryParams.shippedPackages"
            placeholder="请输入发货包裹数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="派送包裹数" prop="deliveredPackages">
          <el-input
            v-model="queryParams.deliveredPackages"
            placeholder="请输入派送包裹数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="签收成功包裹数" prop="successfulDeliveries">
          <el-input
            v-model="queryParams.successfulDeliveries"
            placeholder="请输入签收成功包裹数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="平均支付-签收时长(秒)" prop="avgPayDeliveryTime">
          <el-input
            v-model="queryParams.avgPayDeliveryTime"
            placeholder="请输入平均支付-签收时长(秒)"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="描述相符评分" prop="productDetailMatchScore">
          <el-input
            v-model="queryParams.productDetailMatchScore"
            placeholder="请输入描述相符评分"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="物流服务评分" prop="logisticsServiceScore">
          <el-input
            v-model="queryParams.logisticsServiceScore"
            placeholder="请输入物流服务评分"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="服务态度评分" prop="serviceAttitudeScore">
          <el-input
            v-model="queryParams.serviceAttitudeScore"
            placeholder="请输入服务态度评分"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端下单-支付转化率" prop="pcOrderPayRate">
          <el-input
            v-model="queryParams.pcOrderPayRate"
            placeholder="请输入PC端下单-支付转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端下单-支付转化率" prop="mobileOrderPayRate">
          <el-input
            v-model="queryParams.mobileOrderPayRate"
            placeholder="请输入无线端下单-支付转化率"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="支付商品数" prop="paidProducts">
          <el-input
            v-model="queryParams.paidProducts"
            placeholder="请输入支付商品数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端支付商品数" prop="pcPaidProducts">
          <el-input
            v-model="queryParams.pcPaidProducts"
            placeholder="请输入PC端支付商品数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="无线端支付商品数" prop="mobilePaidItems">
          <el-input
            v-model="queryParams.mobilePaidItems"
            placeholder="请输入无线端支付商品数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="店铺收藏买家数" prop="shopCollectionCount">
          <el-input
            v-model="queryParams.shopCollectionCount"
            placeholder="请输入店铺收藏买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="PC端店铺收藏买家数" prop="pcShopCollectionCount">
          <el-input
            v-model="queryParams.pcShopCollectionCount"
            placeholder="请输入PC端店铺收藏买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item
          label="无线端店铺收藏买家数"
          prop="mobileShopCollectionCount"
        >
          <el-input
            v-model="queryParams.mobileShopCollectionCount"
            placeholder="请输入无线端店铺收藏买家数"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
      </div>
      <!-- <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item> -->
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['product:BiShopMarketingDwd:add']"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['product:BiShopMarketingDwd:edit']"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['product:BiShopMarketingDwd:remove']"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['product:BiShopMarketingDwd:export']"
          >导出</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button size="mini" plain icon="el-icon-upload" @click="daoru"
          >导入</el-button
        >
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>

    <el-table
      v-loading="loading"
      :data="BiShopMarketingDwdList"
      @selection-change="handleSelectionChange"
    >
      <el-table-column width="55" type="selection" align="center" />
      <el-table-column
        width="140"
        label="店铺ID"
        align="center"
        prop="shopId"
      />
      <el-table-column width="140" label="日期" align="center" prop="dataDate">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.dataDate, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column width="140" label="渠道" align="center" prop="channel" />
      <el-table-column width="140" label="品牌" align="center" prop="brand" />
      <el-table-column
        width="140"
        label="PC端访客数"
        align="center"
        prop="pcVisitors"
      />
      <el-table-column
        width="140"
        label="PC端浏览量"
        align="center"
        prop="pcViews"
      />
      <el-table-column
        width="140"
        label="访客数"
        align="center"
        prop="visitors"
      />
      <el-table-column
        width="140"
        label="无线端访客数"
        align="center"
        prop="mobileVisitors"
      />
      <el-table-column width="140" label="浏览量" align="center" prop="views" />
      <el-table-column
        width="140"
        label="无线端浏览量"
        align="center"
        prop="mobileViews"
      />
      <el-table-column
        width="140"
        label="商品访客数"
        align="center"
        prop="productVisitors"
      />
      <el-table-column
        width="140"
        label="无线端商品访客数"
        align="center"
        prop="mobileProductVisitors"
      />
      <el-table-column
        width="140"
        label="PC端商品访客数"
        align="center"
        prop="pcProductVisitors"
      />
      <el-table-column
        width="140"
        label="商品浏览量"
        align="center"
        prop="productViews"
      />
      <el-table-column
        width="140"
        label="无线端商品浏览量"
        align="center"
        prop="mobileProductViews"
      />
      <el-table-column
        width="140"
        label="PC端商品浏览量"
        align="center"
        prop="pcProductViews"
      />
      <el-table-column
        width="140"
        label="平均停留时长"
        align="center"
        prop="averageDuration"
      />
      <el-table-column
        width="140"
        label="无线端平均停留时长"
        align="center"
        prop="mobileAvgDuration"
      />
      <el-table-column
        width="140"
        label="PC端平均停留时长"
        align="center"
        prop="pcAvgDuration"
      />
      <el-table-column
        width="140"
        label="跳失率"
        align="center"
        prop="bounceRate"
      />
      <el-table-column
        width="140"
        label="无线端跳失率"
        align="center"
        prop="mobileBounceRate"
      />
      <el-table-column
        width="140"
        label="PC端跳失率"
        align="center"
        prop="pcBounceRate"
      />
      <el-table-column
        width="140"
        label="商品收藏买家数"
        align="center"
        prop="productCollectionBuyers"
      />
      <el-table-column
        width="140"
        label="无线端商品收藏买家数"
        align="center"
        prop="mobileProductCollectionBuyers"
      />
      <el-table-column
        width="140"
        label="PC端商品收藏买家数"
        align="center"
        prop="pcProductCollectionBuyers"
      />
      <el-table-column
        width="140"
        label="商品收藏次数"
        align="center"
        prop="productCollectionCount"
      />
      <el-table-column
        width="140"
        label="无线端商品收藏次数"
        align="center"
        prop="mobileProductCollectionCount"
      />
      <el-table-column
        width="140"
        label="PC端商品收藏次数"
        align="center"
        prop="pcProductCollectionCount"
      />
      <el-table-column
        width="140"
        label="加购人数"
        align="center"
        prop="addtocartUsers"
      />
      <el-table-column
        width="140"
        label="无线端加购人数"
        align="center"
        prop="mobileAddtocartUsers"
      />
      <el-table-column
        width="140"
        label="PC端加购人数"
        align="center"
        prop="pcAddtocartUsers"
      />
      <el-table-column
        width="140"
        label="支付金额"
        align="center"
        prop="paymentAmount"
      />
      <el-table-column
        width="140"
        label="PC端支付金额"
        align="center"
        prop="pcPaymentAmount"
      />
      <el-table-column
        width="140"
        label="无线端支付金额"
        align="center"
        prop="mobilePaymentAmount"
      />
      <el-table-column
        width="140"
        label="支付买家数"
        align="center"
        prop="paidCustomers"
      />
      <el-table-column
        width="140"
        label="PC端支付买家数"
        align="center"
        prop="pcPaidCustomers"
      />
      <el-table-column
        width="140"
        label="无线端支付买家数"
        align="center"
        prop="mobilePaidCustomers"
      />
      <el-table-column
        width="140"
        label="支付子订单数"
        align="center"
        prop="paidSuborders"
      />
      <el-table-column
        width="140"
        label="PC端支付子订单数"
        align="center"
        prop="pcPaidSuborders"
      />
      <el-table-column
        width="140"
        label="无线端支付子订单数"
        align="center"
        prop="mobilePaidSuborders"
      />
      <el-table-column
        width="140"
        label="支付件数"
        align="center"
        prop="payNumber"
      />
      <el-table-column
        width="140"
        label="PC端支付件数"
        align="center"
        prop="pcPayNumber"
      />
      <el-table-column
        width="140"
        label="无线端支付件数"
        align="center"
        prop="mobilePayNumber"
      />
      <el-table-column
        width="140"
        label="下单金额"
        align="center"
        prop="orderAmount"
      />
      <el-table-column
        width="140"
        label="PC端下单金额"
        align="center"
        prop="pcOrderAmount"
      />
      <el-table-column
        width="140"
        label="无线端下单金额"
        align="center"
        prop="mobileOrderAmount"
      />
      <el-table-column
        width="140"
        label="下单买家数"
        align="center"
        prop="orderBuyers"
      />
      <el-table-column
        width="140"
        label="PC端下单买家数"
        align="center"
        prop="pcOrderBuyers"
      />
      <el-table-column
        width="140"
        label="无线端下单买家数"
        align="center"
        prop="mobileOrderBuyers"
      />
      <el-table-column
        width="140"
        label="下单件数"
        align="center"
        prop="totalOrderNum"
      />
      <el-table-column
        width="140"
        label="PC端下单件数"
        align="center"
        prop="pcOrderNum"
      />
      <el-table-column
        width="140"
        label="无线端下单件数"
        align="center"
        prop="mobileOrderNum"
      />
      <el-table-column
        width="140"
        label="人均浏览量"
        align="center"
        prop="avgViews"
      />
      <el-table-column
        width="140"
        label="PC端人均浏览量"
        align="center"
        prop="pcAvgViews"
      />
      <el-table-column
        width="140"
        label="无线端人均浏览量"
        align="center"
        prop="mobileAvgViews"
      />
      <el-table-column
        width="140"
        label="下单转化率"
        align="center"
        prop="orderConversionRate"
      />
      <el-table-column
        width="140"
        label="PC端下单转化率"
        align="center"
        prop="pcOrderConversionRate"
      />
      <el-table-column
        width="140"
        label="无线端下单转化率"
        align="center"
        prop="mobileOrderConversionRate"
      />
      <el-table-column
        width="140"
        label="支付转化率"
        align="center"
        prop="payConversionRate"
      />
      <el-table-column
        width="140"
        label="PC端支付转化率"
        align="center"
        prop="pcPayConversionRate"
      />
      <el-table-column
        width="140"
        label="无线端支付转化率"
        align="center"
        prop="mobilePayConversionRate"
      />
      <el-table-column
        width="140"
        label="客单价"
        align="center"
        prop="avgCartValue"
      />
      <el-table-column
        width="140"
        label="PC端客单价"
        align="center"
        prop="pcAvgCartValue"
      />
      <el-table-column
        width="140"
        label="无线端客单价"
        align="center"
        prop="mobileAvgCartValue"
      />
      <el-table-column
        width="140"
        label="UV价值"
        align="center"
        prop="uvValue"
      />
      <el-table-column
        width="140"
        label="PC端UV价值"
        align="center"
        prop="pcUvValue"
      />
      <el-table-column
        width="140"
        label="无线端UV价值"
        align="center"
        prop="mobileUvValue"
      />
      <el-table-column
        width="140"
        label="老访客数"
        align="center"
        prop="oldVisitors"
      />
      <el-table-column
        width="140"
        label="新访客数"
        align="center"
        prop="newVisitors"
      />
      <el-table-column
        width="140"
        label="无线端老访客数"
        align="center"
        prop="mobileOldVisitors"
      />
      <el-table-column
        width="140"
        label="无线端新访客数"
        align="center"
        prop="mobileNewVisitors"
      />
      <el-table-column
        width="140"
        label="PC端老访客数"
        align="center"
        prop="pcOldVisitors"
      />
      <el-table-column
        width="140"
        label="PC端新访客数"
        align="center"
        prop="pcNewVisitors"
      />
      <el-table-column
        width="140"
        label="加购件数"
        align="center"
        prop="addtocartItems"
      />
      <el-table-column
        width="140"
        label="PC端加购件数"
        align="center"
        prop="pcAddtocartNum"
      />
      <el-table-column
        width="140"
        label="无线端加购件数"
        align="center"
        prop="mobileAddtocartNum"
      />
      <el-table-column
        width="140"
        label="支付老买家数"
        align="center"
        prop="oldPaidCustomers"
      />
      <el-table-column
        width="140"
        label="PC端支付老买家数"
        align="center"
        prop="pcOldPaidCustomers"
      />
      <el-table-column
        width="140"
        label="无线端支付老买家数"
        align="center"
        prop="mobileOldPaidCustomers"
      />
      <el-table-column
        width="140"
        label="老买家支付金额"
        align="center"
        prop="oldCustomerPaidAmount"
      />
      <el-table-column
        width="140"
        label="直通车消耗"
        align="center"
        prop="ztcConsume"
      />
      <el-table-column
        width="140"
        label="钻石展位消耗"
        align="center"
        prop="zszwConsume"
      />
      <el-table-column
        width="140"
        label="淘宝客佣金"
        align="center"
        prop="tbUserCommission"
      />
      <el-table-column
        width="140"
        label="成功退款金额"
        align="center"
        prop="successReturnAmount"
      />
      <el-table-column
        width="140"
        label="评价数"
        align="center"
        prop="reviewCount"
      />
      <el-table-column
        width="140"
        label="有图评价数"
        align="center"
        prop="reviewWithImages"
      />
      <el-table-column
        width="140"
        label="正面评价数"
        align="center"
        prop="positiveReviews"
      />
      <el-table-column
        width="140"
        label="负面评价数"
        align="center"
        prop="negativeReviews"
      />
      <el-table-column
        width="140"
        label="老买家正面评价数"
        align="center"
        prop="oldCustomerPositive"
      />
      <el-table-column
        width="140"
        label="老买家负面评价数"
        align="center"
        prop="oldCustomerNegative"
      />
      <el-table-column
        width="140"
        label="支付父订单数"
        align="center"
        prop="parentPayments"
      />
      <el-table-column
        width="140"
        label="揽收包裹数"
        align="center"
        prop="pickupPackages"
      />
      <el-table-column
        width="140"
        label="发货包裹数"
        align="center"
        prop="shippedPackages"
      />
      <el-table-column
        width="140"
        label="派送包裹数"
        align="center"
        prop="deliveredPackages"
      />
      <el-table-column
        width="140"
        label="签收成功包裹数"
        align="center"
        prop="successfulDeliveries"
      />
      <el-table-column
        width="140"
        label="平均支付-签收时长(秒)"
        align="center"
        prop="avgPayDeliveryTime"
      />
      <el-table-column
        width="140"
        label="描述相符评分"
        align="center"
        prop="productDetailMatchScore"
      />
      <el-table-column
        width="140"
        label="物流服务评分"
        align="center"
        prop="logisticsServiceScore"
      />
      <el-table-column
        width="140"
        label="服务态度评分"
        align="center"
        prop="serviceAttitudeScore"
      />
      <el-table-column
        width="140"
        label="PC端下单-支付转化率"
        align="center"
        prop="pcOrderPayRate"
      />
      <el-table-column
        width="140"
        label="无线端下单-支付转化率"
        align="center"
        prop="mobileOrderPayRate"
      />
      <el-table-column
        width="140"
        label="支付商品数"
        align="center"
        prop="paidProducts"
      />
      <el-table-column
        width="140"
        label="PC端支付商品数"
        align="center"
        prop="pcPaidProducts"
      />
      <el-table-column
        width="140"
        label="无线端支付商品数"
        align="center"
        prop="mobilePaidItems"
      />
      <el-table-column
        width="140"
        label="店铺收藏买家数"
        align="center"
        prop="shopCollectionCount"
      />
      <el-table-column
        width="140"
        label="PC端店铺收藏买家数"
        align="center"
        prop="pcShopCollectionCount"
      />
      <el-table-column
        width="140"
        label="无线端店铺收藏买家数"
        align="center"
        prop="mobileShopCollectionCount"
      />
      <!-- <el-table-column width="140"
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['product:BiShopMarketingDwd:edit']"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['product:BiShopMarketingDwd:remove']"
            >删除</el-button
          >
        </template>
      </el-table-column> -->
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改店铺运营数据日报表对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="店铺营销数据ID" prop="id">
          <el-input v-model="form.id" placeholder="请输入店铺营销数据ID" />
        </el-form-item>
        <el-form-item label="店铺ID" prop="shopId">
          <el-input v-model="form.shopId" placeholder="请输入店铺ID" />
        </el-form-item>
        <el-form-item label="日期" prop="dataDate">
          <el-date-picker
            clearable
            v-model="form.dataDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="渠道" prop="channel">
          <el-input v-model="form.channel" placeholder="请输入渠道" />
        </el-form-item>
        <el-form-item label="品牌" prop="brand">
          <el-input v-model="form.brand" placeholder="请输入品牌" />
        </el-form-item>
        <el-form-item label="PC端访客数" prop="pcVisitors">
          <el-input v-model="form.pcVisitors" placeholder="请输入PC端访客数" />
        </el-form-item>
        <el-form-item label="PC端浏览量" prop="pcViews">
          <el-input v-model="form.pcViews" placeholder="请输入PC端浏览量" />
        </el-form-item>
        <el-form-item label="访客数" prop="visitors">
          <el-input v-model="form.visitors" placeholder="请输入访客数" />
        </el-form-item>
        <el-form-item label="无线端访客数" prop="mobileVisitors">
          <el-input
            v-model="form.mobileVisitors"
            placeholder="请输入无线端访客数"
          />
        </el-form-item>
        <el-form-item label="浏览量" prop="views">
          <el-input v-model="form.views" placeholder="请输入浏览量" />
        </el-form-item>
        <el-form-item label="无线端浏览量" prop="mobileViews">
          <el-input
            v-model="form.mobileViews"
            placeholder="请输入无线端浏览量"
          />
        </el-form-item>
        <el-form-item label="商品访客数" prop="productVisitors">
          <el-input
            v-model="form.productVisitors"
            placeholder="请输入商品访客数"
          />
        </el-form-item>
        <el-form-item label="无线端商品访客数" prop="mobileProductVisitors">
          <el-input
            v-model="form.mobileProductVisitors"
            placeholder="请输入无线端商品访客数"
          />
        </el-form-item>
        <el-form-item label="PC端商品访客数" prop="pcProductVisitors">
          <el-input
            v-model="form.pcProductVisitors"
            placeholder="请输入PC端商品访客数"
          />
        </el-form-item>
        <el-form-item label="商品浏览量" prop="productViews">
          <el-input
            v-model="form.productViews"
            placeholder="请输入商品浏览量"
          />
        </el-form-item>
        <el-form-item label="无线端商品浏览量" prop="mobileProductViews">
          <el-input
            v-model="form.mobileProductViews"
            placeholder="请输入无线端商品浏览量"
          />
        </el-form-item>
        <el-form-item label="PC端商品浏览量" prop="pcProductViews">
          <el-input
            v-model="form.pcProductViews"
            placeholder="请输入PC端商品浏览量"
          />
        </el-form-item>
        <el-form-item label="平均停留时长" prop="averageDuration">
          <el-input
            v-model="form.averageDuration"
            placeholder="请输入平均停留时长"
          />
        </el-form-item>
        <el-form-item label="无线端平均停留时长" prop="mobileAvgDuration">
          <el-input
            v-model="form.mobileAvgDuration"
            placeholder="请输入无线端平均停留时长"
          />
        </el-form-item>
        <el-form-item label="PC端平均停留时长" prop="pcAvgDuration">
          <el-input
            v-model="form.pcAvgDuration"
            placeholder="请输入PC端平均停留时长"
          />
        </el-form-item>
        <el-form-item label="跳失率" prop="bounceRate">
          <el-input v-model="form.bounceRate" placeholder="请输入跳失率" />
        </el-form-item>
        <el-form-item label="无线端跳失率" prop="mobileBounceRate">
          <el-input
            v-model="form.mobileBounceRate"
            placeholder="请输入无线端跳失率"
          />
        </el-form-item>
        <el-form-item label="PC端跳失率" prop="pcBounceRate">
          <el-input
            v-model="form.pcBounceRate"
            placeholder="请输入PC端跳失率"
          />
        </el-form-item>
        <el-form-item label="商品收藏买家数" prop="productCollectionBuyers">
          <el-input
            v-model="form.productCollectionBuyers"
            placeholder="请输入商品收藏买家数"
          />
        </el-form-item>
        <el-form-item
          label="无线端商品收藏买家数"
          prop="mobileProductCollectionBuyers"
        >
          <el-input
            v-model="form.mobileProductCollectionBuyers"
            placeholder="请输入无线端商品收藏买家数"
          />
        </el-form-item>
        <el-form-item
          label="PC端商品收藏买家数"
          prop="pcProductCollectionBuyers"
        >
          <el-input
            v-model="form.pcProductCollectionBuyers"
            placeholder="请输入PC端商品收藏买家数"
          />
        </el-form-item>
        <el-form-item label="商品收藏次数" prop="productCollectionCount">
          <el-input
            v-model="form.productCollectionCount"
            placeholder="请输入商品收藏次数"
          />
        </el-form-item>
        <el-form-item
          label="无线端商品收藏次数"
          prop="mobileProductCollectionCount"
        >
          <el-input
            v-model="form.mobileProductCollectionCount"
            placeholder="请输入无线端商品收藏次数"
          />
        </el-form-item>
        <el-form-item label="PC端商品收藏次数" prop="pcProductCollectionCount">
          <el-input
            v-model="form.pcProductCollectionCount"
            placeholder="请输入PC端商品收藏次数"
          />
        </el-form-item>
        <el-form-item label="加购人数" prop="addtocartUsers">
          <el-input
            v-model="form.addtocartUsers"
            placeholder="请输入加购人数"
          />
        </el-form-item>
        <el-form-item label="无线端加购人数" prop="mobileAddtocartUsers">
          <el-input
            v-model="form.mobileAddtocartUsers"
            placeholder="请输入无线端加购人数"
          />
        </el-form-item>
        <el-form-item label="PC端加购人数" prop="pcAddtocartUsers">
          <el-input
            v-model="form.pcAddtocartUsers"
            placeholder="请输入PC端加购人数"
          />
        </el-form-item>
        <el-form-item label="支付金额" prop="paymentAmount">
          <el-input v-model="form.paymentAmount" placeholder="请输入支付金额" />
        </el-form-item>
        <el-form-item label="PC端支付金额" prop="pcPaymentAmount">
          <el-input
            v-model="form.pcPaymentAmount"
            placeholder="请输入PC端支付金额"
          />
        </el-form-item>
        <el-form-item label="无线端支付金额" prop="mobilePaymentAmount">
          <el-input
            v-model="form.mobilePaymentAmount"
            placeholder="请输入无线端支付金额"
          />
        </el-form-item>
        <el-form-item label="支付买家数" prop="paidCustomers">
          <el-input
            v-model="form.paidCustomers"
            placeholder="请输入支付买家数"
          />
        </el-form-item>
        <el-form-item label="PC端支付买家数" prop="pcPaidCustomers">
          <el-input
            v-model="form.pcPaidCustomers"
            placeholder="请输入PC端支付买家数"
          />
        </el-form-item>
        <el-form-item label="无线端支付买家数" prop="mobilePaidCustomers">
          <el-input
            v-model="form.mobilePaidCustomers"
            placeholder="请输入无线端支付买家数"
          />
        </el-form-item>
        <el-form-item label="支付子订单数" prop="paidSuborders">
          <el-input
            v-model="form.paidSuborders"
            placeholder="请输入支付子订单数"
          />
        </el-form-item>
        <el-form-item label="PC端支付子订单数" prop="pcPaidSuborders">
          <el-input
            v-model="form.pcPaidSuborders"
            placeholder="请输入PC端支付子订单数"
          />
        </el-form-item>
        <el-form-item label="无线端支付子订单数" prop="mobilePaidSuborders">
          <el-input
            v-model="form.mobilePaidSuborders"
            placeholder="请输入无线端支付子订单数"
          />
        </el-form-item>
        <el-form-item label="支付件数" prop="payNumber">
          <el-input v-model="form.payNumber" placeholder="请输入支付件数" />
        </el-form-item>
        <el-form-item label="PC端支付件数" prop="pcPayNumber">
          <el-input
            v-model="form.pcPayNumber"
            placeholder="请输入PC端支付件数"
          />
        </el-form-item>
        <el-form-item label="无线端支付件数" prop="mobilePayNumber">
          <el-input
            v-model="form.mobilePayNumber"
            placeholder="请输入无线端支付件数"
          />
        </el-form-item>
        <el-form-item label="下单金额" prop="orderAmount">
          <el-input v-model="form.orderAmount" placeholder="请输入下单金额" />
        </el-form-item>
        <el-form-item label="PC端下单金额" prop="pcOrderAmount">
          <el-input
            v-model="form.pcOrderAmount"
            placeholder="请输入PC端下单金额"
          />
        </el-form-item>
        <el-form-item label="无线端下单金额" prop="mobileOrderAmount">
          <el-input
            v-model="form.mobileOrderAmount"
            placeholder="请输入无线端下单金额"
          />
        </el-form-item>
        <el-form-item label="下单买家数" prop="orderBuyers">
          <el-input v-model="form.orderBuyers" placeholder="请输入下单买家数" />
        </el-form-item>
        <el-form-item label="PC端下单买家数" prop="pcOrderBuyers">
          <el-input
            v-model="form.pcOrderBuyers"
            placeholder="请输入PC端下单买家数"
          />
        </el-form-item>
        <el-form-item label="无线端下单买家数" prop="mobileOrderBuyers">
          <el-input
            v-model="form.mobileOrderBuyers"
            placeholder="请输入无线端下单买家数"
          />
        </el-form-item>
        <el-form-item label="下单件数" prop="totalOrderNum">
          <el-input v-model="form.totalOrderNum" placeholder="请输入下单件数" />
        </el-form-item>
        <el-form-item label="PC端下单件数" prop="pcOrderNum">
          <el-input
            v-model="form.pcOrderNum"
            placeholder="请输入PC端下单件数"
          />
        </el-form-item>
        <el-form-item label="无线端下单件数" prop="mobileOrderNum">
          <el-input
            v-model="form.mobileOrderNum"
            placeholder="请输入无线端下单件数"
          />
        </el-form-item>
        <el-form-item label="人均浏览量" prop="avgViews">
          <el-input v-model="form.avgViews" placeholder="请输入人均浏览量" />
        </el-form-item>
        <el-form-item label="PC端人均浏览量" prop="pcAvgViews">
          <el-input
            v-model="form.pcAvgViews"
            placeholder="请输入PC端人均浏览量"
          />
        </el-form-item>
        <el-form-item label="无线端人均浏览量" prop="mobileAvgViews">
          <el-input
            v-model="form.mobileAvgViews"
            placeholder="请输入无线端人均浏览量"
          />
        </el-form-item>
        <el-form-item label="下单转化率" prop="orderConversionRate">
          <el-input
            v-model="form.orderConversionRate"
            placeholder="请输入下单转化率"
          />
        </el-form-item>
        <el-form-item label="PC端下单转化率" prop="pcOrderConversionRate">
          <el-input
            v-model="form.pcOrderConversionRate"
            placeholder="请输入PC端下单转化率"
          />
        </el-form-item>
        <el-form-item label="无线端下单转化率" prop="mobileOrderConversionRate">
          <el-input
            v-model="form.mobileOrderConversionRate"
            placeholder="请输入无线端下单转化率"
          />
        </el-form-item>
        <el-form-item label="支付转化率" prop="payConversionRate">
          <el-input
            v-model="form.payConversionRate"
            placeholder="请输入支付转化率"
          />
        </el-form-item>
        <el-form-item label="PC端支付转化率" prop="pcPayConversionRate">
          <el-input
            v-model="form.pcPayConversionRate"
            placeholder="请输入PC端支付转化率"
          />
        </el-form-item>
        <el-form-item label="无线端支付转化率" prop="mobilePayConversionRate">
          <el-input
            v-model="form.mobilePayConversionRate"
            placeholder="请输入无线端支付转化率"
          />
        </el-form-item>
        <el-form-item label="客单价" prop="avgCartValue">
          <el-input v-model="form.avgCartValue" placeholder="请输入客单价" />
        </el-form-item>
        <el-form-item label="PC端客单价" prop="pcAvgCartValue">
          <el-input
            v-model="form.pcAvgCartValue"
            placeholder="请输入PC端客单价"
          />
        </el-form-item>
        <el-form-item label="无线端客单价" prop="mobileAvgCartValue">
          <el-input
            v-model="form.mobileAvgCartValue"
            placeholder="请输入无线端客单价"
          />
        </el-form-item>
        <el-form-item label="UV价值" prop="uvValue">
          <el-input v-model="form.uvValue" placeholder="请输入UV价值" />
        </el-form-item>
        <el-form-item label="PC端UV价值" prop="pcUvValue">
          <el-input v-model="form.pcUvValue" placeholder="请输入PC端UV价值" />
        </el-form-item>
        <el-form-item label="无线端UV价值" prop="mobileUvValue">
          <el-input
            v-model="form.mobileUvValue"
            placeholder="请输入无线端UV价值"
          />
        </el-form-item>
        <el-form-item label="老访客数" prop="oldVisitors">
          <el-input v-model="form.oldVisitors" placeholder="请输入老访客数" />
        </el-form-item>
        <el-form-item label="新访客数" prop="newVisitors">
          <el-input v-model="form.newVisitors" placeholder="请输入新访客数" />
        </el-form-item>
        <el-form-item label="无线端老访客数" prop="mobileOldVisitors">
          <el-input
            v-model="form.mobileOldVisitors"
            placeholder="请输入无线端老访客数"
          />
        </el-form-item>
        <el-form-item label="无线端新访客数" prop="mobileNewVisitors">
          <el-input
            v-model="form.mobileNewVisitors"
            placeholder="请输入无线端新访客数"
          />
        </el-form-item>
        <el-form-item label="PC端老访客数" prop="pcOldVisitors">
          <el-input
            v-model="form.pcOldVisitors"
            placeholder="请输入PC端老访客数"
          />
        </el-form-item>
        <el-form-item label="PC端新访客数" prop="pcNewVisitors">
          <el-input
            v-model="form.pcNewVisitors"
            placeholder="请输入PC端新访客数"
          />
        </el-form-item>
        <el-form-item label="加购件数" prop="addtocartItems">
          <el-input
            v-model="form.addtocartItems"
            placeholder="请输入加购件数"
          />
        </el-form-item>
        <el-form-item label="PC端加购件数" prop="pcAddtocartNum">
          <el-input
            v-model="form.pcAddtocartNum"
            placeholder="请输入PC端加购件数"
          />
        </el-form-item>
        <el-form-item label="无线端加购件数" prop="mobileAddtocartNum">
          <el-input
            v-model="form.mobileAddtocartNum"
            placeholder="请输入无线端加购件数"
          />
        </el-form-item>
        <el-form-item label="支付老买家数" prop="oldPaidCustomers">
          <el-input
            v-model="form.oldPaidCustomers"
            placeholder="请输入支付老买家数"
          />
        </el-form-item>
        <el-form-item label="PC端支付老买家数" prop="pcOldPaidCustomers">
          <el-input
            v-model="form.pcOldPaidCustomers"
            placeholder="请输入PC端支付老买家数"
          />
        </el-form-item>
        <el-form-item label="无线端支付老买家数" prop="mobileOldPaidCustomers">
          <el-input
            v-model="form.mobileOldPaidCustomers"
            placeholder="请输入无线端支付老买家数"
          />
        </el-form-item>
        <el-form-item label="老买家支付金额" prop="oldCustomerPaidAmount">
          <el-input
            v-model="form.oldCustomerPaidAmount"
            placeholder="请输入老买家支付金额"
          />
        </el-form-item>
        <el-form-item label="直通车消耗" prop="ztcConsume">
          <el-input v-model="form.ztcConsume" placeholder="请输入直通车消耗" />
        </el-form-item>
        <el-form-item label="钻石展位消耗" prop="zszwConsume">
          <el-input
            v-model="form.zszwConsume"
            placeholder="请输入钻石展位消耗"
          />
        </el-form-item>
        <el-form-item label="淘宝客佣金" prop="tbUserCommission">
          <el-input
            v-model="form.tbUserCommission"
            placeholder="请输入淘宝客佣金"
          />
        </el-form-item>
        <el-form-item label="成功退款金额" prop="successReturnAmount">
          <el-input
            v-model="form.successReturnAmount"
            placeholder="请输入成功退款金额"
          />
        </el-form-item>
        <el-form-item label="评价数" prop="reviewCount">
          <el-input v-model="form.reviewCount" placeholder="请输入评价数" />
        </el-form-item>
        <el-form-item label="有图评价数" prop="reviewWithImages">
          <el-input
            v-model="form.reviewWithImages"
            placeholder="请输入有图评价数"
          />
        </el-form-item>
        <el-form-item label="正面评价数" prop="positiveReviews">
          <el-input
            v-model="form.positiveReviews"
            placeholder="请输入正面评价数"
          />
        </el-form-item>
        <el-form-item label="负面评价数" prop="negativeReviews">
          <el-input
            v-model="form.negativeReviews"
            placeholder="请输入负面评价数"
          />
        </el-form-item>
        <el-form-item label="老买家正面评价数" prop="oldCustomerPositive">
          <el-input
            v-model="form.oldCustomerPositive"
            placeholder="请输入老买家正面评价数"
          />
        </el-form-item>
        <el-form-item label="老买家负面评价数" prop="oldCustomerNegative">
          <el-input
            v-model="form.oldCustomerNegative"
            placeholder="请输入老买家负面评价数"
          />
        </el-form-item>
        <el-form-item label="支付父订单数" prop="parentPayments">
          <el-input
            v-model="form.parentPayments"
            placeholder="请输入支付父订单数"
          />
        </el-form-item>
        <el-form-item label="揽收包裹数" prop="pickupPackages">
          <el-input
            v-model="form.pickupPackages"
            placeholder="请输入揽收包裹数"
          />
        </el-form-item>
        <el-form-item label="发货包裹数" prop="shippedPackages">
          <el-input
            v-model="form.shippedPackages"
            placeholder="请输入发货包裹数"
          />
        </el-form-item>
        <el-form-item label="派送包裹数" prop="deliveredPackages">
          <el-input
            v-model="form.deliveredPackages"
            placeholder="请输入派送包裹数"
          />
        </el-form-item>
        <el-form-item label="签收成功包裹数" prop="successfulDeliveries">
          <el-input
            v-model="form.successfulDeliveries"
            placeholder="请输入签收成功包裹数"
          />
        </el-form-item>
        <el-form-item label="平均支付-签收时长(秒)" prop="avgPayDeliveryTime">
          <el-input
            v-model="form.avgPayDeliveryTime"
            placeholder="请输入平均支付-签收时长(秒)"
          />
        </el-form-item>
        <el-form-item label="描述相符评分" prop="productDetailMatchScore">
          <el-input
            v-model="form.productDetailMatchScore"
            placeholder="请输入描述相符评分"
          />
        </el-form-item>
        <el-form-item label="物流服务评分" prop="logisticsServiceScore">
          <el-input
            v-model="form.logisticsServiceScore"
            placeholder="请输入物流服务评分"
          />
        </el-form-item>
        <el-form-item label="服务态度评分" prop="serviceAttitudeScore">
          <el-input
            v-model="form.serviceAttitudeScore"
            placeholder="请输入服务态度评分"
          />
        </el-form-item>
        <el-form-item label="PC端下单-支付转化率" prop="pcOrderPayRate">
          <el-input
            v-model="form.pcOrderPayRate"
            placeholder="请输入PC端下单-支付转化率"
          />
        </el-form-item>
        <el-form-item label="无线端下单-支付转化率" prop="mobileOrderPayRate">
          <el-input
            v-model="form.mobileOrderPayRate"
            placeholder="请输入无线端下单-支付转化率"
          />
        </el-form-item>
        <el-form-item label="支付商品数" prop="paidProducts">
          <el-input
            v-model="form.paidProducts"
            placeholder="请输入支付商品数"
          />
        </el-form-item>
        <el-form-item label="PC端支付商品数" prop="pcPaidProducts">
          <el-input
            v-model="form.pcPaidProducts"
            placeholder="请输入PC端支付商品数"
          />
        </el-form-item>
        <el-form-item label="无线端支付商品数" prop="mobilePaidItems">
          <el-input
            v-model="form.mobilePaidItems"
            placeholder="请输入无线端支付商品数"
          />
        </el-form-item>
        <el-form-item label="店铺收藏买家数" prop="shopCollectionCount">
          <el-input
            v-model="form.shopCollectionCount"
            placeholder="请输入店铺收藏买家数"
          />
        </el-form-item>
        <el-form-item label="PC端店铺收藏买家数" prop="pcShopCollectionCount">
          <el-input
            v-model="form.pcShopCollectionCount"
            placeholder="请输入PC端店铺收藏买家数"
          />
        </el-form-item>
        <el-form-item
          label="无线端店铺收藏买家数"
          prop="mobileShopCollectionCount"
        >
          <el-input
            v-model="form.mobileShopCollectionCount"
            placeholder="请输入无线端店铺收藏买家数"
          />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改产品二级信息对话框 :on-change="handleChange"-->
    <el-dialog
      title="导入"
      :visible.sync="dialogVisible"
      width="500px"
      append-to-body
      v-if="dialogVisible"
    >
      <!-- 文件上传-->
      <el-form
        :rules="rules"
        :model="dataForm"
        ref="dataForm"
        label-width="150px"
        @submit.native.prevent
      >
        <el-form-item label="店铺：" prop="name">
          <!-- <el-input
            type="text"
            v-model.trim="dataForm.name"
            clearable
          ></el-input> -->
          <el-cascader
            class="region"
            v-model="dataForm.name"
            placeholder="选择店铺分组"
            clearable
            :options="cascadeList"
            :props="{ checkStrictly: true }"
            style="width: 300px; height: 30px"
          >
          </el-cascader>
        </el-form-item>
        <el-form-item label="文件：" prop="file">
          <el-upload
            class="upload-import"
            ref="uploadImport"
            :http-request="httpRequest"
            action=""
            :on-remove="handleRemove"
            :file-list="fileList"
            :limit="1"
            :on-change="handleChange"
            :auto-upload="false"
            :before-upload="beforeAvatarUpload"
          >
            <!--
            accept="application/zip,.zip" 设置接收的文件类型-->
            <el-button
              v-show="!hasFile"
              slot="trigger"
              size="small"
              type="primary"
              >选取文件</el-button
            >
            <!-- <div slot="tip" class="el-upload__tip">
          只能上传zip文件，且不超过10M
        </div> -->
          </el-upload>
          <!-- 关闭自动上传-->
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="submitUpload">提交</el-button>
          <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> -->
          <el-button @click="dialogVisible = false">取 消</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import {
  listBiShopMarketingDwd,
  getBiShopMarketingDwd,
  delBiShopMarketingDwd,
  addBiShopMarketingDwd,
  updateBiShopMarketingDwd,
} from "@/api/keyword/BiShopMarketingDwd";
import timeSearch from "@/views/chart/day/day.vue";
import axios from "axios";

//--------导入token
import { getToken } from "@/utils/auth";
import { listAll, importBiKeyword } from "@/api/chart/brandChannelShop";
export default {
  name: "BiShopMarketingDwd",
  data() {
    return {
      cascadeList: [],
      dataForm: {
        name: ["VFU", "天猫", "vfu运动旗舰店"],
        file: null,
      },
      hasFile: false,
      fileList: [],
      dialogVisible: false,
      pjtUrl: process.env.VUE_APP_BASE_API,
      dayActive: 2,
      timeArr: [
        { value: "2", label: "昨天" },
        { value: "7", label: "最近7天" },
        { value: "30", label: "最近30天" },
        { value: "365", label: "最近一年" },
        { value: "1", label: "日" },
      ],
      timeGap: { startTime: "", endTime: "" },
      isOpen: false,
      //纵向滚动条
      tableHeight: "",
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 店铺运营数据日报表表格数据
      BiShopMarketingDwdList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        shopId: null,
        dataDate: null,
        channel: null,
        brand: null,
        pcVisitors: null,
        pcViews: null,
        visitors: null,
        mobileVisitors: null,
        views: null,
        mobileViews: null,
        productVisitors: null,
        mobileProductVisitors: null,
        pcProductVisitors: null,
        productViews: null,
        mobileProductViews: null,
        pcProductViews: null,
        averageDuration: null,
        mobileAvgDuration: null,
        pcAvgDuration: null,
        bounceRate: null,
        mobileBounceRate: null,
        pcBounceRate: null,
        productCollectionBuyers: null,
        mobileProductCollectionBuyers: null,
        pcProductCollectionBuyers: null,
        productCollectionCount: null,
        mobileProductCollectionCount: null,
        pcProductCollectionCount: null,
        addtocartUsers: null,
        mobileAddtocartUsers: null,
        pcAddtocartUsers: null,
        paymentAmount: null,
        pcPaymentAmount: null,
        mobilePaymentAmount: null,
        paidCustomers: null,
        pcPaidCustomers: null,
        mobilePaidCustomers: null,
        paidSuborders: null,
        pcPaidSuborders: null,
        mobilePaidSuborders: null,
        payNumber: null,
        pcPayNumber: null,
        mobilePayNumber: null,
        orderAmount: null,
        pcOrderAmount: null,
        mobileOrderAmount: null,
        orderBuyers: null,
        pcOrderBuyers: null,
        mobileOrderBuyers: null,
        totalOrderNum: null,
        pcOrderNum: null,
        mobileOrderNum: null,
        avgViews: null,
        pcAvgViews: null,
        mobileAvgViews: null,
        orderConversionRate: null,
        pcOrderConversionRate: null,
        mobileOrderConversionRate: null,
        payConversionRate: null,
        pcPayConversionRate: null,
        mobilePayConversionRate: null,
        avgCartValue: null,
        pcAvgCartValue: null,
        mobileAvgCartValue: null,
        uvValue: null,
        pcUvValue: null,
        mobileUvValue: null,
        oldVisitors: null,
        newVisitors: null,
        mobileOldVisitors: null,
        mobileNewVisitors: null,
        pcOldVisitors: null,
        pcNewVisitors: null,
        addtocartItems: null,
        pcAddtocartNum: null,
        mobileAddtocartNum: null,
        oldPaidCustomers: null,
        pcOldPaidCustomers: null,
        mobileOldPaidCustomers: null,
        oldCustomerPaidAmount: null,
        ztcConsume: null,
        zszwConsume: null,
        tbUserCommission: null,
        successReturnAmount: null,
        reviewCount: null,
        reviewWithImages: null,
        positiveReviews: null,
        negativeReviews: null,
        oldCustomerPositive: null,
        oldCustomerNegative: null,
        parentPayments: null,
        pickupPackages: null,
        shippedPackages: null,
        deliveredPackages: null,
        successfulDeliveries: null,
        avgPayDeliveryTime: null,
        productDetailMatchScore: null,
        logisticsServiceScore: null,
        serviceAttitudeScore: null,
        pcOrderPayRate: null,
        mobileOrderPayRate: null,
        paidProducts: null,
        pcPaidProducts: null,
        mobilePaidItems: null,
        shopCollectionCount: null,
        pcShopCollectionCount: null,
        mobileShopCollectionCount: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  created() {
    this.getList();
    this.getdataSourceList();
  },
  methods: {
    //图片上传前的相关判断
    beforeAvatarUpload(file) {
      // const isJPG = file.type == 'image/jpeg' || file.type == 'image/png';
      const isLt2M = file.size / 1024 / 1024 < 100;
      // if (!isJPG) {
      //     this.$message.error('上传头像图片只能是 JPG/PNG 格式!');
      // }
      if (!isLt2M) {
        this.$message.error("上传导入文件大小不能超过 100MB!");
      }

      return isLt2M;
    },
    handleRemove(file, fileList) {
      if (!fileList.length) {
        this.hasFile = false;
      }
      this.dataForm.file = null;
    },
    handleChange(file, fileList) {
      if (fileList.length >= 2) {
        return;
      }
      if (fileList.length === 1) {
        this.hasFile = true;
      }
      this.dataForm.file = file;
    },
    //确定按钮
    //调用组件upload的submit方法，从而触发httpRequest方法，实现手动上传
    submitUpload() {
      this.$refs["dataForm"].validate((valid) => {
        if (valid) {
          this.$refs.uploadImport.submit();
        }
      });
    },
    httpRequest(param) {
      if (this.dataForm.name.length < 3) {
        this.$modal.msgWarning("请选择到店铺");
        return;
      }
      let fd = new FormData();
      fd.append("file", param.file); // 传文件
      fd.append("salesGrade", this.dataForm.name);
      //dataPar.file.raw
      console.log(JSON.stringify(fd));
      this.openLoading();
      axios
        .post(
          process.env.VUE_APP_BASE_API +
            "/product/BiShopMarketingDwd/importData",
          fd,
          {
            headers: {
              header: { responseType: "blob" },

              Authorization: "Bearer " + getToken(),
              "Content-Type": "multipart/form-data",
            }, //定义内容格式,很重要
            // timeout: 20000,
          }
        )
        .then((response) => {
          console.log(response);
          if (response.data.code == 200) {
            this.dialogVisible = false;

            this.$modal.closeLoading();
            this.$modal.msgSuccess("导入成功");
            this.hasFile = false;
            this.getList();
          }
        });
    },
    //部门文件导入修改打开
    daoru() {
      this.dialogVisible = true;
    },
    // 打开加载层
    openLoading() {
      this.$modal.loading("正在导入，请稍候！");
    },
    /** 查询品牌渠道店铺关系列表 */
    getdataSourceList() {
      listAll().then((response) => {
        let result = this.transformData(response);
        this.cascadeList = result;
      });
    },
    //店铺渠道品牌转换

    transformData(data) {
      let result = [];

      data.forEach((item) => {
        let brand = item.brand;
        let channel = item.channel;
        let shopName = item.shopName;

        // 如果brand在结果数组中不存在，则创建一个新的数组
        let brandIndex = result.findIndex(
          (brandObj) => brandObj.label === brand
        );
        if (brandIndex === -1) {
          result.push({
            label: brand,
            value: brand,
            children: [],
          });
          brandIndex = result.length - 1;
        }

        // 如果channel在当前brand的children数组中不存在，则创建一个新的数组
        let channelIndex = result[brandIndex].children.findIndex(
          (channelObj) => channelObj.label === channel
        );
        if (channelIndex === -1) {
          result[brandIndex].children.push({
            label: channel,
            value: channel,
            children: [],
          });
          channelIndex = result[brandIndex].children.length - 1;
        }

        // 如果shopName在当前channel的children数组中不存在，则创建一个新的数组
        let shopIndex = result[brandIndex].children[
          channelIndex
        ].children.findIndex((shopObj) => shopObj.label === shopName);
        if (shopIndex === -1) {
          result[brandIndex].children[channelIndex].children.push({
            label: shopName,
            value: shopName,
            // children: []
          });
        }
      });

      return result;
    },
    handleRefreshCache() {
      this.$modal.msgWarning("数据正在同步，请稍候");
      const obj = {
        startDate: this.timeGap.startTime,
        endDate: this.timeGap.endTime,
      };
      insertBatchFirstData(obj).then(() => {
        this.$modal.msgSuccess("同步数据成功");
        this.getList();
        // this.$store.dispatch('dict/cleanDict');
      });
    },
    handleLable() {
      this.$modal.msgWarning("数据正在同步，请稍候");
      const obj = {
        startDate: this.timeGap.startTime,
        endDate: this.timeGap.endTime,
      };
      updateKeywordLabel(obj).then(() => {
        this.$modal.msgSuccess("同步数据成功");
        this.getList();
        // this.$store.dispatch('dict/cleanDict');
      });
    },
    //时间控件
    changDay(val) {
      this.dayActive = val;
      this.timeGap.startTime = val[0];
      this.timeGap.endTime = val[1];
    },
    getDateArr(value) {
      this.timeGap.startTime = value[0];
      this.timeGap.endTime = value[1];
      console.log(JSON.stringify(this.timeGap));
      // this.queryParams.payDayStart = this.timeGap.startTime;
      // this.queryParams.payDayEnd = this.timeGap.endTime;

      // this.getList();

      this.dayActive = 1;
    },
    //搜索栏展示与收起
    shouqi() {
      // console.log(1);
      this.isOpen = !this.isOpen;
    },
    // table自动高度
    returnTableHeight(ref, bottomOffset) {
      let height = null;
      height =
        window.innerHeight - ref.getBoundingClientRect().top - bottomOffset;
      return height;
    },

    resizeTable() {
      this.$nextTick(() => {
        this.tableHeight = this.returnTableHeight(this.$refs.tableDom, 100);
      }, 0);
    },
    /** 查询店铺运营数据日报表列表 */
    getList() {
      this.loading = true;
      listBiShopMarketingDwd(this.queryParams).then((response) => {
        this.BiShopMarketingDwdList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        shopId: null,
        dataDate: null,
        channel: null,
        brand: null,
        pcVisitors: null,
        pcViews: null,
        visitors: null,
        mobileVisitors: null,
        views: null,
        mobileViews: null,
        productVisitors: null,
        mobileProductVisitors: null,
        pcProductVisitors: null,
        productViews: null,
        mobileProductViews: null,
        pcProductViews: null,
        averageDuration: null,
        mobileAvgDuration: null,
        pcAvgDuration: null,
        bounceRate: null,
        mobileBounceRate: null,
        pcBounceRate: null,
        productCollectionBuyers: null,
        mobileProductCollectionBuyers: null,
        pcProductCollectionBuyers: null,
        productCollectionCount: null,
        mobileProductCollectionCount: null,
        pcProductCollectionCount: null,
        addtocartUsers: null,
        mobileAddtocartUsers: null,
        pcAddtocartUsers: null,
        paymentAmount: null,
        pcPaymentAmount: null,
        mobilePaymentAmount: null,
        paidCustomers: null,
        pcPaidCustomers: null,
        mobilePaidCustomers: null,
        paidSuborders: null,
        pcPaidSuborders: null,
        mobilePaidSuborders: null,
        payNumber: null,
        pcPayNumber: null,
        mobilePayNumber: null,
        orderAmount: null,
        pcOrderAmount: null,
        mobileOrderAmount: null,
        orderBuyers: null,
        pcOrderBuyers: null,
        mobileOrderBuyers: null,
        totalOrderNum: null,
        pcOrderNum: null,
        mobileOrderNum: null,
        avgViews: null,
        pcAvgViews: null,
        mobileAvgViews: null,
        orderConversionRate: null,
        pcOrderConversionRate: null,
        mobileOrderConversionRate: null,
        payConversionRate: null,
        pcPayConversionRate: null,
        mobilePayConversionRate: null,
        avgCartValue: null,
        pcAvgCartValue: null,
        mobileAvgCartValue: null,
        uvValue: null,
        pcUvValue: null,
        mobileUvValue: null,
        oldVisitors: null,
        newVisitors: null,
        mobileOldVisitors: null,
        mobileNewVisitors: null,
        pcOldVisitors: null,
        pcNewVisitors: null,
        addtocartItems: null,
        pcAddtocartNum: null,
        mobileAddtocartNum: null,
        oldPaidCustomers: null,
        pcOldPaidCustomers: null,
        mobileOldPaidCustomers: null,
        oldCustomerPaidAmount: null,
        ztcConsume: null,
        zszwConsume: null,
        tbUserCommission: null,
        successReturnAmount: null,
        reviewCount: null,
        reviewWithImages: null,
        positiveReviews: null,
        negativeReviews: null,
        oldCustomerPositive: null,
        oldCustomerNegative: null,
        parentPayments: null,
        pickupPackages: null,
        shippedPackages: null,
        deliveredPackages: null,
        successfulDeliveries: null,
        avgPayDeliveryTime: null,
        productDetailMatchScore: null,
        logisticsServiceScore: null,
        serviceAttitudeScore: null,
        pcOrderPayRate: null,
        mobileOrderPayRate: null,
        paidProducts: null,
        pcPaidProducts: null,
        mobilePaidItems: null,
        shopCollectionCount: null,
        pcShopCollectionCount: null,
        mobileShopCollectionCount: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加店铺运营数据日报表";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids;
      getBiShopMarketingDwd(id).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "修改店铺运营数据日报表";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.id != null) {
            updateBiShopMarketingDwd(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addBiShopMarketingDwd(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除店铺运营数据日报表编号为"' + ids + '"的数据项？')
        .then(function () {
          return delBiShopMarketingDwd(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download(
        "product/BiShopMarketingDwd/export",
        {
          ...this.queryParams,
        },
        `BiShopMarketingDwd_${new Date().getTime()}.xlsx`
      );
    },
  },
};
</script>
